import { createApp } from 'vue'
import App from '@/App.vue'
import '@/styles/index.scss'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'
//@ts-ignore忽略当前文件ts类型的检测否则有红色提示(打包会失败)
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'virtual:svg-icons-register'
import gloablComponent from './components/index'
//引入路由
import router from './router'
//引入仓库
import pinia from './store'
//引入路由鉴权文件
import './permisstion'
const app = createApp(App)
//引入自定义指令文件
import { isHasButton } from '@/directive/has'
isHasButton(app)
app.use(ElementPlus)
app.use(ElementPlus, {
  locale: zhCn,
})
//注册模板路由
app.use(router)
//注册仓库
app.use(pinia)
app.use(gloablComponent)
app.mount('#app')
